home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Beta / Quicktime 2.0 Beta.iso / Programming Stuff / Interfaces / Universal Interfaces / Displays.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-30  |  9.8 KB  |  288 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Displays.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __DISPLAYS__
  13. #define __DISPLAYS__
  14.  
  15. #ifndef __TRAPS__
  16. #include <Traps.h>
  17. #endif
  18.  
  19. #ifndef __EVENTS__
  20. #include <Events.h>
  21. /*    #include <Types.h>                                            */
  22. /*        #include <ConditionalMacros.h>                            */
  23. /*        #include <MixedMode.h>                                    */
  24. /*    #include <Quickdraw.h>                                        */
  25. /*        #include <QuickdrawText.h>                                */
  26. /*            #include <IntlResources.h>                            */
  27. /*    #include <OSUtils.h>                                        */
  28. #endif
  29.  
  30. #ifndef __PROCESSES__
  31. #include <Processes.h>
  32. /*    #include <Files.h>                                            */
  33. /*        #include <SegLoad.h>                                    */
  34. #endif
  35.  
  36. #ifndef __COMPONENTS__
  37. #include <Components.h>
  38. #endif
  39.  
  40. #ifndef __WINDOWS__
  41. #include <Windows.h>
  42. /*    #include <Controls.h>                                        */
  43. /*        #include <Menus.h>                                        */
  44. #endif
  45.  
  46. #ifndef __APPLEEVENTS__
  47. #include <AppleEvents.h>
  48. /*    #include <Memory.h>                                            */
  49. /*    #include <EPPC.h>                                            */
  50. /*        #include <PPCToolBox.h>                                    */
  51. /*            #include <AppleTalk.h>                                */
  52. /*    #include <Notification.h>                                    */
  53. #endif
  54.  
  55.  
  56. /* AppleEvents Core Suite */
  57.  
  58. #define kAESystemConfigNotice 'cnfg'
  59.  
  60.  
  61. /* Core Suite types */
  62.  
  63. #define kAEDisplayNotice 'dspl'
  64.  
  65. #define kAEDisplaySummary 'dsum'
  66.  
  67. #define keyDMConfigVersion 'dmcv'
  68.  
  69. #define keyDMConfigFlags 'dmcf'
  70.  
  71. #define keyDMConfigReserved 'dmcr'
  72.  
  73. #define keyDisplayID 'dmid'
  74.  
  75. #define keyDisplayComponent 'dmdc'
  76.  
  77. #define keyDisplayDevice 'dmdd'
  78.  
  79. #define keyDisplayFlags 'dmdf'
  80.  
  81. #define keyDisplayMode 'dmdm'
  82.  
  83. #define keyDisplayModeReserved 'dmmr'
  84.  
  85. #define keyDisplayReserved 'dmdr'
  86.  
  87. #define keyDisplayMirroredId 'dmmi'
  88.  
  89. #define keyDeviceFlags 'dddf'
  90.  
  91. #define keyDeviceDepthMode 'dddm'
  92.  
  93. #define keyDeviceRect 'dddr'
  94.  
  95. #define keyPixMapRect 'dpdr'
  96.  
  97. #define keyPixMapHResolution 'dphr'
  98.  
  99. #define keyPixMapVResolution 'dpvr'
  100.  
  101. #define keyPixMapPixelType 'dppt'
  102.  
  103. #define keyPixMapPixelSize 'dpps'
  104.  
  105. #define keyPixMapCmpCount 'dpcc'
  106.  
  107. #define keyPixMapCmpSize 'dpcs'
  108.  
  109. #define keyPixMapAlignment 'dppa'
  110.  
  111. #define keyPixMapResReserved 'dprr'
  112.  
  113. #define keyPixMapReserved 'dppr'
  114.  
  115. #define keyPixMapColorTableSeed 'dpct'
  116.  
  117. #define keySummaryMenubar 'dsmb'
  118.  
  119. #define keySummaryChanges 'dsch'
  120.  
  121. #define keyDisplayOldConfig 'dold'
  122.  
  123. #define keyDisplayNewConfig 'dnew'
  124.  
  125. #define dmOnlyActiveDisplays true
  126.  
  127. #define dmAllDisplays false
  128.  
  129. typedef unsigned long DisplayIDType;
  130.  
  131.  
  132. /* Switch Flags */
  133.  
  134. enum  {
  135.     kNoSwitchConfirmBit            = 0,                            /* Flag indicating that there is no need to confirm a switch to this mode */
  136.     kDepthNotAvailableBit
  137. };
  138.  
  139.  
  140. /* Summary Change Flags (sticky bits indicating an operation was performed) */
  141.  
  142.  
  143. /* Note that moving a display, then moving it back will still set the kMovedDisplayBit */
  144.  
  145. enum  {
  146.     kBeginEndConfigureBit        = 0,
  147.     kMovedDisplayBit,
  148.     kSetMainDisplayBit,
  149.     kSetDisplayModeBit,
  150.     kAddDisplayBit,
  151.     kRemoveDisplayBit,
  152.     kNewDisplayBit,
  153.     kDisposeDisplayBit,
  154.     kEnabledDisplayBit,
  155.     kDisabledDisplayBit,
  156.     kMirrorDisplayBit,
  157.     kUnMirrorDisplayBit
  158. };
  159.  
  160. typedef pascal void (*DMNotificationProcPtr)(AppleEvent *theEvent);
  161.  
  162. enum {
  163.     uppDMNotificationProcInfo = kPascalStackBased
  164.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(AppleEvent*)))
  165. };
  166.  
  167. #if USESROUTINEDESCRIPTORS
  168. typedef UniversalProcPtr DMNotificationUPP;
  169.  
  170. #define CallDMNotificationProc(userRoutine, theEvent)        \
  171.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDMNotificationProcInfo, (theEvent))
  172. #define NewDMNotificationProc(userRoutine)        \
  173.         (DMNotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDMNotificationProcInfo, GetCurrentISA())
  174. #else
  175. typedef DMNotificationProcPtr DMNotificationUPP;
  176.  
  177. #define CallDMNotificationProc(userRoutine, theEvent)        \
  178.         (*(userRoutine))((theEvent))
  179. #define NewDMNotificationProc(userRoutine)        \
  180.         (DMNotificationUPP)(userRoutine)
  181. #endif
  182.  
  183.  
  184. /* Display Manager Error Codes */
  185.  
  186. enum  {
  187.     kDMGenErr                    = -6220,                        /* Unexpected Error */
  188. /* Mirroring-Specific Errors */
  189.     kDMMirroringOnAlreadyErr    = -6221,                        /* Returned by all calls that need mirroring to be off to do their thing */
  190.     kDMWrongNumberOfDisplaysErr    = -6222,                        /* Can only handle 2 displays for now */
  191.     kDMMirroringBlockedErr        = -6223,                        /* DMBlockMirroring() has been called */
  192.     kDMCantBlockErr                = -6224,                        /* Mirroring is already on, can’t Block now (call DMUnMirror() first) */
  193.     kDMMirroringNotOnErr        = -6225,                        /* Returned by all calls that need mirroring to be on to do their thing */
  194. /* Other Errors */
  195.     kSysSWTooOldErr                = -6226,                        /* Missing critical pieces of System Software */
  196.     kDMSWNotInitializedErr        = -6227,                        /* Required software not initialized (eg windowmanager or display mgr) */
  197.     kDMDriverNotDisplayMgrAwareErr = -6228,                        /* Video Driver does not support display manager */
  198.     kDMDisplayNotFoundErr        = -6229,                        /* Could not find item */
  199.     kDMDisplayAlreadyInstalledErr = -6230                        /* Attempt to add an already installed display */
  200. };
  201.  
  202. #ifdef __cplusplus
  203. extern "C" {
  204. #endif
  205.  
  206. extern pascal GDHandle DMGetFirstScreenDevice(Boolean activeOnly)
  207.  TWOWORDINLINE(0x7000, 0xABEB);
  208. extern pascal GDHandle DMGetNextScreenDevice(GDHandle theDevice, Boolean activeOnly)
  209.  TWOWORDINLINE(0x7001, 0xABEB);
  210. extern pascal void DMDrawDesktopRect(Rect *globalRect)
  211.  TWOWORDINLINE(0x7002, 0xABEB);
  212. extern pascal void DMDrawDesktopRegion(RgnHandle globalRgn)
  213.  TWOWORDINLINE(0x7003, 0xABEB);
  214. extern pascal OSErr DMGetGDeviceTablecloth(GDHandle displayDevice, ComponentInstance *tableclothInstance)
  215.  THREEWORDINLINE(0x303C, 0x0404, 0xABEB);
  216. extern pascal OSErr DMSetGDeviceTablecloth(GDHandle displayDevice, ComponentInstance tableclothInstance)
  217.  THREEWORDINLINE(0x303C, 0x0405, 0xABEB);
  218. extern pascal OSErr DMBeginConfigureDisplays(Handle *displayState)
  219.  THREEWORDINLINE(0x303C, 0x0206, 0xABEB);
  220. extern pascal OSErr DMEndConfigureDisplays(Handle displayState)
  221.  THREEWORDINLINE(0x303C, 0x0207, 0xABEB);
  222. extern pascal OSErr DMAddDisplay(GDHandle newDevice, short driver, unsigned long mode, unsigned long reserved, unsigned long displayID, ComponentInstance displayComponent, Handle displayState)
  223.  THREEWORDINLINE(0x303C, 0x0D08, 0xABEB);
  224. extern pascal OSErr DMMoveDisplay(GDHandle moveDevice, short x, short y, Handle displayState)
  225.  THREEWORDINLINE(0x303C, 0x0609, 0xABEB);
  226. extern pascal OSErr DMDisableDisplay(GDHandle disableDevice, Handle displayState)
  227.  THREEWORDINLINE(0x303C, 0x040A, 0xABEB);
  228. extern pascal OSErr DMEnableDisplay(GDHandle enableDevice, Handle displayState)
  229.  THREEWORDINLINE(0x303C, 0x040B, 0xABEB);
  230. extern pascal OSErr DMRemoveDisplay(GDHandle removeDevice, Handle displayState)
  231.  THREEWORDINLINE(0x303C, 0x040C, 0xABEB);
  232. extern pascal OSErr DMGetComponentAnimateTicks(ComponentInstance animationComponent, unsigned long *goodDelay, unsigned long *maxDelay)
  233.  THREEWORDINLINE(0x303C, 0x060D, 0xABEB);
  234. extern pascal OSErr DMSetComponentAnimateTicks(ComponentInstance animationComponent, unsigned long goodDelay, unsigned long maxDelay)
  235.  THREEWORDINLINE(0x303C, 0x060E, 0xABEB);
  236. extern pascal OSErr DMGetNextAnimateTime(unsigned long *nextAnimateTime)
  237.  THREEWORDINLINE(0x303C, 0x020F, 0xABEB);
  238. extern pascal OSErr DMSetMainDisplay(GDHandle newMainDevice, Handle displayState)
  239.  THREEWORDINLINE(0x303C, 0x0410, 0xABEB);
  240. extern pascal OSErr DMSetDisplayMode(GDHandle theDevice, unsigned long mode, unsigned long *depthMode, unsigned long reserved, Handle displayState)
  241.  THREEWORDINLINE(0x303C, 0x0A11, 0xABEB);
  242. extern pascal OSErr DMCheckDisplayMode(GDHandle theDevice, unsigned long mode, unsigned long depthMode, unsigned long *switchFlags, unsigned long reserved, Boolean *modeOk)
  243.  THREEWORDINLINE(0x303C, 0x0C12, 0xABEB);
  244. extern pascal OSErr DMGetDeskRegion(RgnHandle *desktopRegion)
  245.  THREEWORDINLINE(0x303C, 0x0213, 0xABEB);
  246. extern pascal OSErr DMRegisterNotifyProc(DMNotificationUPP notificationProc, ProcessSerialNumberPtr whichPSN)
  247.  THREEWORDINLINE(0x303C, 0x0414, 0xABEB);
  248. extern pascal OSErr DMRemoveNotifyProc(DMNotificationUPP notificationProc, ProcessSerialNumberPtr whichPSN)
  249.  THREEWORDINLINE(0x303C, 0x0415, 0xABEB);
  250. extern pascal OSErr DMQDIsMirroringCapable(Boolean *qdIsMirroringCapable)
  251.  THREEWORDINLINE(0x303C, 0x0216, 0xABEB);
  252. extern pascal OSErr DMCanMirrorNow(Boolean *canMirrorNow)
  253.  THREEWORDINLINE(0x303C, 0x0217, 0xABEB);
  254. extern pascal OSErr DMIsMirroringOn(Boolean *isMirroringOn)
  255.  THREEWORDINLINE(0x303C, 0x0218, 0xABEB);
  256. extern pascal OSErr DMMirrorDevices(GDHandle gD1, GDHandle gD2, Handle displayState)
  257.  THREEWORDINLINE(0x303C, 0x0619, 0xABEB);
  258. extern pascal OSErr DMUnmirrorDevice(GDHandle gDevice, Handle displayState)
  259.  THREEWORDINLINE(0x303C, 0x041A, 0xABEB);
  260. extern pascal OSErr DMGetNextMirroredDevice(GDHandle gDevice, GDHandle *mirroredDevice)
  261.  THREEWORDINLINE(0x303C, 0x041B, 0xABEB);
  262. extern pascal OSErr DMBlockMirroring(void)
  263.  TWOWORDINLINE(0x701C, 0xABEB);
  264. extern pascal OSErr DMUnblockMirroring(void)
  265.  TWOWORDINLINE(0x701D, 0xABEB);
  266. extern pascal OSErr DMGetDisplayMgrA5World(unsigned long *dmA5)
  267.  THREEWORDINLINE(0x303C, 0x021E, 0xABEB);
  268. extern pascal OSErr DMGetDisplayIDByGDevice(GDHandle displayDevice, DisplayIDType *displayID, Boolean failToMain)
  269.  THREEWORDINLINE(0x303C, 0x051F, 0xABEB);
  270. extern pascal OSErr DMGetGDeviceByDisplayID(DisplayIDType displayID, GDHandle *displayDevice, Boolean failToMain)
  271.  THREEWORDINLINE(0x303C, 0x0520, 0xABEB);
  272. extern pascal OSErr DMSetDisplayComponent(GDHandle theDevice, ComponentInstance displayComponent)
  273.  THREEWORDINLINE(0x303C, 0x0421, 0xABEB);
  274. extern pascal OSErr DMGetDisplayComponent(GDHandle theDevice, ComponentInstance *displayComponent)
  275.  THREEWORDINLINE(0x303C, 0x0422, 0xABEB);
  276. extern pascal OSErr DMNewDisplay(GDHandle *newDevice, short driverRefNum, unsigned long mode, unsigned long reserved, DisplayIDType displayID, ComponentInstance displayComponent, Handle displayState)
  277.  THREEWORDINLINE(0x303C, 0x0D23, 0xABEB);
  278. extern pascal OSErr DMDisposeDisplay(GDHandle disposeDevice, Handle displayState)
  279.  THREEWORDINLINE(0x303C, 0x0424, 0xABEB);
  280. extern pascal OSErr DMResolveDisplayComponents(void)
  281.  TWOWORDINLINE(0x7025, 0xABEB);
  282. #ifdef __cplusplus
  283. }
  284. #endif
  285.  
  286. #endif
  287.  
  288.